home *** CD-ROM | disk | FTP | other *** search
/ Guidemac 2 / Guidemac 2.iso / Logiciels divers T1 / HyperCard (Tous types) / Colour Text Stack / Colour Text Stack / cards.xml < prev    next >
Text File  |  1992-09-22  |  45KB  |  673 lines

  1. card_4980.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>4980</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>2781</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>3</id>
  15.         <text>Page 10 of 10</text>
  16.     </content>
  17.     <content>
  18.         <layer>background</layer>
  19.         <id>12</id>
  20.         <highlight> <true /> </highlight>
  21.     </content>
  22.     <content>
  23.         <layer>background</layer>
  24.         <id>9</id>
  25.         <text>Programmers Information</text>
  26.     </content>
  27.     <content>
  28.         <layer>background</layer>
  29.         <id>2</id>
  30.         <text><span class="style21">yperTalk Programmers</span><span class="style1">You can use the external commands and fonts in this stack in your own stacks using the HyperTalk statement:    start using stack "Colour Text Stack"Alternatively you may copy the resources from this stack into your own using a resource copying stack or ResEdit. Remember if you distribute stacks using this package you must include a copy of the license & copyright notice, see the license for details.The syntax of the </span><span class="style12">ColourText[RGB]</span><span class="style1"> XCFNs are:    ColourText[RGB](</span><span class="style12">card</span><span class="style1">, </span><span class="style12">field id</span><span class="style1">, </span><span class="style12">scroll</span><span class="style1">, </span><span class="style12">wide</span><span class="style1">, </span><span class="style12">table</span><span class="style1">, </span><span class="style12">window</span><span class="style1">[, </span><span class="style12">visible</span><span class="style1">])where:card    A boolean flag, true if colouring a card field.field id    The id of the field to be coloured.scroll    True for scrolling fields.wide    True for fields with wide margins.table    Name of the colour table to use.window    Name for the window.visible    Initial visibility of the window, true means visible. If omitted true is    assumed.Return value    Returns true if succesful.To ease the use of the XFCNs two function handlers are provided in the stack script:    function Colourize[RGB](</span><span class="style12">field spec</span><span class="style1">, </span><span class="style12">table</span><span class="style1">, </span><span class="style12">window</span><span class="style1">)where:</span><span class="style12">field spec</span><span class="style1">    Name of field to colourize </span><span class="style12">as a string</span><span class="style1">, e.g. "cd fld fred".</span><span class="style12">table</span><span class="style1">, </span><span class="style12">window</span><span class="style1">    As above.The following externals are also in this stack for use by the </span><span class="style12">Colour Table Maker</span><span class="style1"> stack.    BuildNPct </span><span class="style12">function</span><span class="style1">[,</span><span class="style12">arguments</span><span class="style1">]This XCMD is used to construct and save colour tables. You do not need to know how this works as the </span><span class="style12">Colour Table Maker</span><span class="style1"> stack is provided so you can build tables. If you wish to know how to use it read the scripts!    ColourPicker(</span><span class="style12">prompt</span><span class="style1">[,</span><span class="style12">red</span><span class="style1">,</span><span class="style12">green</span><span class="style1">,</span><span class="style12">blue</span><span class="style1">])This XFCN displays a standard Colour Picker dialog. The dialog is automatically positioned in the best location (Apple's not my ‚Äúbest location‚Äù, so don't blame me if you think its a silly place on your Mac). An RGB value may optionally be supplied to use as the starting colour, if omitted white is used. The return value is a RGB value (3 numeric items).</span><span class="style21">Font Programmers</span><span class="style1">The fonts in this stack are duplicated in the font file ‚ÄúColour Text Fonts‚Äù. The fonts in this stack & the suitcase share their NFNT's to save space, if you copy them this sharing will be lost unless you take care to preserve it. As the suitcase shares NFNTs you cannot open it with System 7, I see this as a bug in System 7 ‚Äì it might of course be a feature :-( You can remove the fonts from this stack if you wish using ResEdit or Font/DA Mover ‚Äì ‚Äúoption open‚Äù in the latter. You can copy the fonts into your system if you don't have SuitCase II etc. using Font/DA Mover, System 7.0.1 will </span><span class="style21">not</span><span class="style1"> open the suitcase.</span><span class="style21">Application Programmers</span><span class="style1">You may used the WDEF used by </span><span class="style12">ColourText[RGB]</span><span class="style1"> in your own programs if you wish, subject of course to the license conditions of this package. The WDEF has ID 528 and draws a white rectangular borderless window. All mouse clicks are reported as </span><span class="style12">inContent</span><span class="style1">.</span></text>
  31.     </content>
  32.     <name></name>
  33.     <script></script>
  34. </card>
  35.  
  36.  
  37. card_5954.xml
  38. <?xml version="1.0" encoding="utf-8" ?>
  39. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  40. <card>
  41.     <id>5954</id>
  42.     <filler1>0</filler1>
  43.     <cantDelete> <false /> </cantDelete>
  44.     <showPict> <true /> </showPict>
  45.     <dontSearch> <false /> </dontSearch>
  46.     <owner>2781</owner>
  47.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  48.     <part>
  49.         <id>1</id>
  50.         <type>button</type>
  51.         <visible> <true /> </visible>
  52.         <reserved5> 0 </reserved5>
  53.         <reserved4> 0 </reserved4>
  54.         <reserved3> 0 </reserved3>
  55.         <reserved2> 0 </reserved2>
  56.         <reserved1> 0 </reserved1>
  57.         <enabled> <true /> </enabled>
  58.         <rect>
  59.             <left>153</left>
  60.             <top>107</top>
  61.             <right>251</right>
  62.             <bottom>164</bottom>
  63.         </rect>
  64.         <style>roundrect</style>
  65.         <showName> <true /> </showName>
  66.         <highlight> <false /> </highlight>
  67.         <autoHighlight> <false /> </autoHighlight>
  68.         <sharedHighlight> <true /> </sharedHighlight>
  69.         <family>0</family>
  70.         <titleWidth>0</titleWidth>
  71.         <icon>1000</icon>
  72.         <textAlign>center</textAlign>
  73.         <font>Chicago</font>
  74.         <textSize>12</textSize>
  75.         <textStyle>plain</textStyle>
  76.         <name>Colour Table Maker</name>
  77.         <script>on mouseUpgo to stack "Colour Table Maker"end mouseUp</script>
  78.     </part>
  79.     <content>
  80.         <layer>background</layer>
  81.         <id>3</id>
  82.         <text>Page 9 of 10</text>
  83.     </content>
  84.     <content>
  85.         <layer>background</layer>
  86.         <id>9</id>
  87.         <text>Colour Tables</text>
  88.     </content>
  89.     <content>
  90.         <layer>background</layer>
  91.         <id>2</id>
  92.         <text><span class="style1">he colour tables used to map font names or </span><span class="style12">Colour Switcher</span><span class="style1"> characters to colours are stored as </span><span class="style12">resources</span><span class="style1">. The stack </span><span class="style12">Colour Table Maker</span><span class="style1"> is provided which enables the construction and deletion of colour tables.</span></text>
  93.     </content>
  94.     <name></name>
  95.     <script></script>
  96. </card>
  97.  
  98.  
  99. card_4074.xml
  100. <?xml version="1.0" encoding="utf-8" ?>
  101. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  102. <card>
  103.     <id>4074</id>
  104.     <filler1>0</filler1>
  105.     <cantDelete> <false /> </cantDelete>
  106.     <showPict> <true /> </showPict>
  107.     <dontSearch> <false /> </dontSearch>
  108.     <owner>2781</owner>
  109.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  110.     <content>
  111.         <layer>background</layer>
  112.         <id>3</id>
  113.         <text>Page 8 of 10</text>
  114.     </content>
  115.     <content>
  116.         <layer>background</layer>
  117.         <id>9</id>
  118.         <text>Disadvantages of Using Windows</text>
  119.     </content>
  120.     <content>
  121.         <layer>background</layer>
  122.         <id>2</id>
  123.         <text><span class="style1">he </span><span class="style21">big</span><span class="style1"> advantage of using windows for colour text is that they are a standard HyperCard facility and should therefore not break in future versions of HyperCard. There are some disadvantages. First you'll notice a slight delay when switching to a card with colour in this stack before the colour appears, this is due to the time taken to construct the window and (very) carefully draw it over the top of the existing field to reduce any update flicker. Second, and more important, windows are treated as independant entities by HyperCard, they do not </span><span class="style12">belong</span><span class="style1"> to any particulart card window. This translates to; move the card window and the colour text windows stay behind‚Ķ This is why the title bar has been hidden on this stack, so you cannot move the card window and leave the colour behind. This problem can however be scripted around by writing handlers for the standard HyperCard </span><span class="style12">moveWindow</span><span class="style1"> and </span><span class="style12">sizeWindow</span><span class="style1"> messages ‚Äì we leave this as an exercise.</span></text>
  124.     </content>
  125.     <name></name>
  126.     <script></script>
  127. </card>
  128.  
  129.  
  130. card_3640.xml
  131. <?xml version="1.0" encoding="utf-8" ?>
  132. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  133. <card>
  134.     <id>3640</id>
  135.     <filler1>0</filler1>
  136.     <cantDelete> <false /> </cantDelete>
  137.     <showPict> <true /> </showPict>
  138.     <dontSearch> <false /> </dontSearch>
  139.     <owner>2781</owner>
  140.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  141.     <content>
  142.         <layer>background</layer>
  143.         <id>3</id>
  144.         <text>Page 7 of 10</text>
  145.     </content>
  146.     <content>
  147.         <layer>background</layer>
  148.         <id>9</id>
  149.         <text>What was that about windows?</text>
  150.     </content>
  151.     <content>
  152.         <layer>background</layer>
  153.         <id>12</id>
  154.         <highlight> <true /> </highlight>
  155.     </content>
  156.     <content>
  157.         <layer>background</layer>
  158.         <id>2</id>
  159.         <text><span class="style1">here are three primary ways to add colour to HyperCard displays:1) ‚ÄúThe Internal Parasite‚Äù. This method digs into HyperCard's internals and adds in colour buffering and screen drawing. Depending on how deep the added colouring code is buried HyperCard this allows the background and/or HC objects (buttons, fields) to be coloured. The disadvantages are that it uses a lot of memory for the colour buffers (which typically have to be card sized) and will probably break when a new version of HyperCard is released as the internals will change. The advantage of this method is colour which is cleanly incorporated into the displayed image. This is the method used by Colorize HC and, I believe, HyperTint.2) ‚ÄúThe Surface Rash‚Äù. This method simply draws colour images directly into HyperCard's window (or the same area of display) </span><span class="style12">without</span><span class="style1"> HyperCard's knowledge. Unfortunately if HyperCard updates the card image, as it does not know the colour image is there, it just draws over it ‚Äì this erases the coloured image (completely or partially depending on where HyperCard draws). This is one of the methods used by the QuickTime XCMDs from Apple/Claris.3) ‚ÄúExternal Windows/Palettes‚Äù. This is the only method which HyperCard directly supports; thus it should work with future versions, unlike (1), and won't be accidentally erased, unlike (2). It works by drawing in a different window to that used by the card image. Such windows may be moved, hidden, closed etc. using standard HyperTalk commands. They are created by special external commands, the navigator palette and tear-off tool menu are examples which are part of the standard HyperCard release. The standard Picture external and the QuickTime externals use this method to display colour. The Pictoid Package and Colour Text also use this method. In the case of Pictoids the windows may be any shape, contain pictures/movies, have no standard window-like frame, and act like buttons. Colour Text uses special borderless windows which are drawn directly over the field being coloured and are hence (almost) invisible.</span></text>
  160.     </content>
  161.     <name></name>
  162.     <script></script>
  163. </card>
  164.  
  165.  
  166. card_4178.xml
  167. <?xml version="1.0" encoding="utf-8" ?>
  168. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  169. <card>
  170.     <id>4178</id>
  171.     <filler1>0</filler1>
  172.     <cantDelete> <false /> </cantDelete>
  173.     <showPict> <true /> </showPict>
  174.     <dontSearch> <false /> </dontSearch>
  175.     <owner>2781</owner>
  176.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  177.     <part>
  178.         <id>5</id>
  179.         <type>field</type>
  180.         <visible> <true /> </visible>
  181.         <dontWrap> <false /> </dontWrap>
  182.         <dontSearch> <false /> </dontSearch>
  183.         <sharedText> <false /> </sharedText>
  184.         <fixedLineHeight> <false /> </fixedLineHeight>
  185.         <autoTab> <false /> </autoTab>
  186.         <lockText> <false /> </lockText>
  187.         <rect>
  188.             <left>134</left>
  189.             <top>140</top>
  190.             <right>408</right>
  191.             <bottom>208</bottom>
  192.         </rect>
  193.         <style>scrolling</style>
  194.         <autoSelect> <false /> </autoSelect>
  195.         <showLines> <false /> </showLines>
  196.         <wideMargins> <true /> </wideMargins>
  197.         <multipleLines> <false /> </multipleLines>
  198.         <reservedFamily> 0 </reservedFamily>
  199.         <titleWidth>0</titleWidth>
  200.         <icon>0</icon>
  201.         <textAlign>left</textAlign>
  202.         <font>Colour Marker</font>
  203.         <textSize>9</textSize>
  204.         <textStyle>plain</textStyle>
  205.         <textHeight>12</textHeight>
  206.         <name>Demo</name>
  207.         <script></script>
  208.     </part>
  209.     <part>
  210.         <id>7</id>
  211.         <type>field</type>
  212.         <visible> <true /> </visible>
  213.         <dontWrap> <false /> </dontWrap>
  214.         <dontSearch> <false /> </dontSearch>
  215.         <sharedText> <false /> </sharedText>
  216.         <fixedLineHeight> <false /> </fixedLineHeight>
  217.         <autoTab> <false /> </autoTab>
  218.         <lockText> <true /> </lockText>
  219.         <rect>
  220.             <left>12</left>
  221.             <top>157</top>
  222.             <right>129</right>
  223.             <bottom>190</bottom>
  224.         </rect>
  225.         <style>shadow</style>
  226.         <autoSelect> <false /> </autoSelect>
  227.         <showLines> <false /> </showLines>
  228.         <wideMargins> <true /> </wideMargins>
  229.         <multipleLines> <false /> </multipleLines>
  230.         <reservedFamily> 0 </reservedFamily>
  231.         <titleWidth>0</titleWidth>
  232.         <icon>0</icon>
  233.         <textAlign>center</textAlign>
  234.         <font>Times</font>
  235.         <textSize>12</textSize>
  236.         <textStyle>plain</textStyle>
  237.         <textHeight>16</textHeight>
  238.         <name>demoButton</name>
  239.         <script>on mouseUpput me into logoif logo contains "(1)" thenset the textFont of cd fld "Demo" to "Colour Switcher"put "(2) Colour field" into meelse if logo contains "(2)" thenget Colourize("cd fld Demo", "Example Font Colours", "Colour")put "(3) Reset demo" into meelseresetDemoend ifend mouseUpon resetDemoif there is a window "Colour" then close window "Colour"set the scroll of cd fld "Demo" to 0set the textFont of cd fld "Demo" to "Colour Marker"put "(1) Change base font to Colour Switcher" into meend resetDemo</script>
  240.     </part>
  241.     <content>
  242.         <layer>background</layer>
  243.         <id>3</id>
  244.         <text>Page 6 of 10</text>
  245.     </content>
  246.     <content>
  247.         <layer>background</layer>
  248.         <id>9</id>
  249.         <text>Method 2 (cont)</text>
  250.     </content>
  251.     <content>
  252.         <layer>background</layer>
  253.         <id>2</id>
  254.         <text><span class="style1">ethod 2 may seem a lot better than method 1; </span><span class="style12">any</span><span class="style1"> font can be coloured </span><span class="style12">any</span><span class="style1"> of the available colours by just inserting the appropriate characters from </span><span class="style12">Colour Switcher</span><span class="style1"> ‚Äì no need to use different fonts for different colours. However, things are never that easy! As method 2 relies on switching characters, if the switching characters are not actually printed, i.e. the are scrolled offscreen or hidden under something else, then the colour will not switch, or will switch in interesting ways :-(. The example below demonstrates the problem:</span></text>
  255.     </content>
  256.     <content>
  257.         <layer>card</layer>
  258.         <id>5</id>
  259.         <text><span class="style83"></span><span class="style26">Method 2</span><span class="style83">!</span><span class="style26"> may seem a lot better than method 1; </span><span class="style82">any</span><span class="style26"> font can be coloured </span><span class="style82">any</span><span class="style26"> of the available colours by just inserting the appropriate characters from </span><span class="style82">Colour Switcher</span><span class="style26"> ‚Äì no need to use different fonts for different colours. </span><span class="style83">"</span><span class="style26">However, things are never that easy!</span><span class="style83">!</span><span class="style26"> As method 2 relies on switching characters, if the switching characters are not actually printed, i.e. the are scrolled offscreen or hidden under something else, then the colour will not switch, or will switch in interesting ways </span><span class="style83">#</span><span class="style26">:-(</span><span class="style83">!</span><span class="style26">.</span></text>
  260.     </content>
  261.     <content>
  262.         <layer>card</layer>
  263.         <id>7</id>
  264.         <text>(1) Change base font to Colour Switcher</text>
  265.     </content>
  266.     <name></name>
  267.     <script>on openCardsend resetDemo to cd fld "demoButton"pass openCardend openCardon closeCardsend resetDemo to cd fld "demoButton"pass closeCardend closeCard</script>
  268. </card>
  269.  
  270.  
  271. card_2516.xml
  272. <?xml version="1.0" encoding="utf-8" ?>
  273. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  274. <card>
  275.     <id>2516</id>
  276.     <filler1>0</filler1>
  277.     <cantDelete> <false /> </cantDelete>
  278.     <showPict> <true /> </showPict>
  279.     <dontSearch> <false /> </dontSearch>
  280.     <owner>2781</owner>
  281.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  282.     <content>
  283.         <layer>background</layer>
  284.         <id>3</id>
  285.         <text>Page 5 of 10</text>
  286.     </content>
  287.     <content>
  288.         <layer>background</layer>
  289.         <id>9</id>
  290.         <text>Specifying Text Colour ‚Äì Method 2</text>
  291.     </content>
  292.     <content>
  293.         <layer>background</layer>
  294.         <id>2</id>
  295.         <text><span class="style1">he second method provided to colour text is the font </span><span class="style12">Colour Switcher</span><span class="style1">. When </span><span class="style12">ColourText[RGB]</span><span class="style1"> prints a character using the </span><span class="style12">Colour Switcher</span><span class="style1"> it first switches the current foreground and background colours according to the value of the character ‚Äì the character ‚Äò!‚Äô (ASCII 33) sets the colours to black & white, subsequent characters ‚Äò"‚Äô, ‚Äò#‚Äô, ‚Äò$‚Äô, etc. (ASCII 34, 35, 36, etc.) select the colours in the 1st, 2nd, 3rd, etc. entries in the colour table; the three character font name field is ignored. All characters in the </span><span class="style12">Colour Switcher</span><span class="style1"> font are invisible so that you may switch colours in your text without any visible control characters.Invisible characters are rather hard to type (!), so to making using </span><span class="style12">Colour Switcher</span><span class="style1"> possible a second font </span><span class="style12">Colour Marker</span><span class="style1"> is included, this font contains the characters: </span><span class="style81">!</span><span class="style1">, </span><span class="style81">"</span><span class="style1">, </span><span class="style81">#</span><span class="style1">, </span><span class="style81">$</span><span class="style1">, etc. (up to </span><span class="style81">?</span><span class="style1"> at present). You may type in your text using the </span><span class="style12">Colour Marker</span><span class="style1"> font to show the colours and then change all text in </span><span class="style12">Colour Marker</span><span class="style1"> to </span><span class="style12">Colour Switcher</span><span class="style1">.</span><span class="style21">Hint</span><span class="style1">: To make switching between </span><span class="style12">Colour Marker</span><span class="style1"> and </span><span class="style12">Colour Switcher</span><span class="style1"> easy use the following steps:1) Set the base font of the field to </span><span class="style12">Colour Marker</span><span class="style1"> using the </span><span class="style31">Field Info‚Ķ</span><span class="style1"> dialog.2) Using the </span><span class="style31">Font</span><span class="style1"> menu change the font of typed text to the one you wish to use.3) When you wish to change text colour use the </span><span class="style31">Font</span><span class="style1"> menu to select the </span><span class="style12">Colour Marker</span><span class="style1"> font.4) When finished entering the text use the </span><span class="style31">Field Info‚Ķ</span><span class="style1"> dialog to change the base font to </span><span class="style12">Colour Switcher</span><span class="style1"> ‚Äì all characters in </span><span class="style12">Colour Marker</span><span class="style1"> will change face (and become invisible).5) If you wish to edit the field use the </span><span class="style31">Field Info‚Ķ</span><span class="style1"> dialog to change the base font back to </span><span class="style12">Colour Marker</span><span class="style1">.</span></text>
  296.     </content>
  297.     <content>
  298.         <layer>background</layer>
  299.         <id>12</id>
  300.         <highlight> <true /> </highlight>
  301.     </content>
  302.     <name></name>
  303.     <script></script>
  304. </card>
  305.  
  306.  
  307. card_4611.xml
  308. <?xml version="1.0" encoding="utf-8" ?>
  309. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  310. <card>
  311.     <id>4611</id>
  312.     <filler1>0</filler1>
  313.     <cantDelete> <false /> </cantDelete>
  314.     <showPict> <true /> </showPict>
  315.     <dontSearch> <false /> </dontSearch>
  316.     <owner>2781</owner>
  317.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  318.     <content>
  319.         <layer>background</layer>
  320.         <id>3</id>
  321.         <text>Page 4 of 10</text>
  322.     </content>
  323.     <content>
  324.         <layer>background</layer>
  325.         <id>9</id>
  326.         <text>Method 1 (cont)</text>
  327.     </content>
  328.     <content>
  329.         <layer>background</layer>
  330.         <id>2</id>
  331.         <text><span class="style1">he disadvantages of using the text font to indicate colour are obvious, it relies on font names being unique in their first three letters and coloured text must be in a different font to black on white text. Both these disadvantages can be addressed by constructing special fonts for colouring, these can be based on existing fonts with just the names changed.</span><span class="style21">Example</span><span class="style1">This stack contains the following fonts, all just renamed versions of Monaco: </span><span class="style56">%01Monaco</span><span class="style80">, </span><span class="style57">%02Monaco</span><span class="style80">, </span><span class="style58">%03Monaco</span><span class="style80">, </span><span class="style59">%04Monaco</span><span class="style80">, </span><span class="style60">%05Monaco</span><span class="style80">, </span><span class="style61">%06Monaco</span><span class="style80">, </span><span class="style62">%07Monaco</span><span class="style80">, </span><span class="style63">%08Monaco</span><span class="style80">, </span><span class="style64">%09Monaco</span><span class="style80">, </span><span class="style65">%10Monaco</span><span class="style80">, </span><span class="style66">%11Monaco</span><span class="style80">, </span><span class="style67">%12Monaco</span><span class="style80">, </span><span class="style68">%13Monaco</span><span class="style80">, </span><span class="style69">%14Monaco</span><span class="style80">, </span><span class="style70">%15Monaco</span><span class="style80">, </span><span class="style71">%16Monaco</span><span class="style80">, </span><span class="style72">%17Monaco</span><span class="style80">, </span><span class="style73">%18Monaco</span><span class="style80">, </span><span class="style74">%19Monaco</span><span class="style80">, </span><span class="style75">%20Monaco</span><span class="style80">, </span><span class="style76">%21Monaco</span><span class="style80">, </span><span class="style77">%22Monaco</span><span class="style80">, </span><span class="style78">%23Monaco</span><span class="style1"> and </span><span class="style79">%24Monaco</span><span class="style1">These variants of Monaco have been named so that name clashes with existing fonts are unlikely. The use of the '%' as the first character stops the fonts from appearing in standard font menus, this is a standard Macintosh feature.</span><span class="style21">Note for ResEdit and Font Hackers</span><span class="style1">Special fonts for text colouring take up space but need not take up a lot if they are carefully constructed. All 24 variants of Monaco in this stack share the same bitmap resources (NFNTs), i.e. there are 24 font descriptions (FONDs) but only two bitmaps (9 & 12 point NFNTs).</span></text>
  332.     </content>
  333.     <content>
  334.         <layer>background</layer>
  335.         <id>12</id>
  336.         <highlight> <true /> </highlight>
  337.     </content>
  338.     <name></name>
  339.     <script>on openWindowsget Colourize("bg fld Text", "TextColours", "Colour")end openWindowson closeCardif there is a window "Colour" thenclose window "Colour"end ifend closeCard</script>
  340. </card>
  341.  
  342.  
  343. card_4374.xml
  344. <?xml version="1.0" encoding="utf-8" ?>
  345. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  346. <card>
  347.     <id>4374</id>
  348.     <filler1>0</filler1>
  349.     <cantDelete> <false /> </cantDelete>
  350.     <showPict> <true /> </showPict>
  351.     <dontSearch> <false /> </dontSearch>
  352.     <owner>2781</owner>
  353.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  354.     <content>
  355.         <layer>background</layer>
  356.         <id>3</id>
  357.         <text>Page 3 of 10</text>
  358.     </content>
  359.     <content>
  360.         <layer>background</layer>
  361.         <id>9</id>
  362.         <text>Specifying Text Colour ‚Äì Method 1</text>
  363.     </content>
  364.     <content>
  365.         <layer>background</layer>
  366.         <id>2</id>
  367.         <text><span class="style1">he colour of text can be specified using two methods. The first method determines the colour from the text font and the colour table. Each colour table entry is a triple of the form:<first three letters of font name>,<text colour>,<background colour>When ColourText[RGB] draws text on the screen it first checks whether the first three letters of the text font match an entry in the colour table and if so changes the text & background colours. This method will work well in any style of field.</span><span class="style21">Example</span><span class="style1">This field has been coloured using the call:¬†¬†¬†¬†¬†get Colourize("bg fld Text", "Example Font Colouring", "Demo")The colour table ‚ÄúExample Font Colouring‚Äù colours </span><span class="style29">New York</span><span class="style1"> font red, </span><span class="style13">Monaco</span><span class="style1"> green, </span><span class="style30">Geneva</span><span class="style1"> yellow on blue and </span><span class="style31">Chicago</span><span class="style1"> cyan (these fonts have been picked as they're standard on Macintoshes, others can be used). You will notice that as you scroll this field the coloured text scrolls correctly, and if you're using System 7 you will also notice that the scroll bar is coloured.</span></text>
  368.     </content>
  369.     <content>
  370.         <layer>background</layer>
  371.         <id>12</id>
  372.         <highlight> <true /> </highlight>
  373.     </content>
  374.     <name></name>
  375.     <script>on openWindowsget Colourize("bg fld Text", "Example Font Colours", "Colour")end openWindowson closeCardif there is a window "Colour" thenclose window "Colour"end ifend closeCard</script>
  376. </card>
  377.  
  378.  
  379. card_2150.xml
  380. <?xml version="1.0" encoding="utf-8" ?>
  381. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  382. <card>
  383.     <id>2150</id>
  384.     <filler1>0</filler1>
  385.     <cantDelete> <false /> </cantDelete>
  386.     <showPict> <true /> </showPict>
  387.     <dontSearch> <false /> </dontSearch>
  388.     <owner>2781</owner>
  389.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  390.     <content>
  391.         <layer>background</layer>
  392.         <id>3</id>
  393.         <text>Page 2 of 10</text>
  394.     </content>
  395.     <content>
  396.         <layer>background</layer>
  397.         <id>9</id>
  398.         <text><span class="style1">he </span><span class="style11">ColourText[RGB]</span><span class="style1"> XFCNs</span></text>
  399.     </content>
  400.     <content>
  401.         <layer>background</layer>
  402.         <id>2</id>
  403.         <text><span class="style1">he </span><span class="style12">ColourText </span><span class="style1">and </span><span class="style12">ColourTextRGB</span><span class="style1"> XFCNs colour the text in a field using either the original 8 QuickDraw colours (ColourText) or Colour QuickDraw RGB colours (ColourTextRGB). To make the use of these XFCNs simpler two function handlers, </span><span class="style12">Colourize</span><span class="style1"> and </span><span class="style12">ColourizeRGB</span><span class="style1">, are provided in the stack script to call the XFCNs themselves. The syntax of these functions is:Colourize[RGB]("<field specification>", "<colour table>", "window name")Where: the </span><span class="style12">field specification</span><span class="style1"> is a string identifying the field to colour, e.g. "cd fld id 1"; the </span><span class="style12">colour table</span><span class="style1"> is the name of a colour table resource used to determine text colour; and </span><span class="style12">window name</span><span class="style1"> is the name to use for the window ColourText[RGB] uses to draw the colour text into (the use of windows will be explained later).</span></text>
  404.     </content>
  405.     <name></name>
  406.     <script></script>
  407. </card>
  408.  
  409.  
  410. card_2867.xml
  411. <?xml version="1.0" encoding="utf-8" ?>
  412. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  413. <card>
  414.     <id>2867</id>
  415.     <filler1>0</filler1>
  416.     <cantDelete> <false /> </cantDelete>
  417.     <showPict> <true /> </showPict>
  418.     <dontSearch> <false /> </dontSearch>
  419.     <owner>2781</owner>
  420.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  421.     <content>
  422.         <layer>background</layer>
  423.         <id>3</id>
  424.         <text>Page 1 of 10</text>
  425.     </content>
  426.     <content>
  427.         <layer>background</layer>
  428.         <id>9</id>
  429.         <text>HyperCard and Colour</text>
  430.     </content>
  431.     <content>
  432.         <layer>background</layer>
  433.         <id>12</id>
  434.         <highlight> <true /> </highlight>
  435.     </content>
  436.     <content>
  437.         <layer>background</layer>
  438.         <id>2</id>
  439.         <text><span class="style1">yperCard 2.1 does not directly support colour, though a future version from Claris is rumored to. There are however a number of existing ways of adding colour to stacks, primary among which are:‚Ä¢ The Picture XCMDThis XCMD comes with HyperCard and will display colour pictures in standard Macintosh windows, either in the card or palette window layer of HyperCard. If you have Wild Magic installed then Picture will also display QuickTime movies‚Ñ¢.‚Ä¢ The QuickTime‚Ñ¢ Externals from Apple/ClarisEither as part of the QuickTime‚Ñ¢ package from Apple, or as part of the latest release of HyperCard from Claris, a number of externals are available which will display QuickTime‚Ñ¢ movies and compressed pictures. These externals will use standard Macintosh windows or draw directly into the card window; the disadvantage of the latter approach being that HyperCard does not know about the drawing and may erase it.‚Ä¢ Colorize HyperCardThis is a FreeWare stack from BungDubba (?sp) which contains externals which can colour any part of a card. This stack is very powerful but unfortunately due to the multiple screen buffering which must be used a large amount of memory is consumed when using it. You should be able to ftp it from your local archive site. (BungDubba is rumored to really be the Claris HC team‚Ķ)‚Ä¢ The Pictoid PackageThis is a ‚Äúfree for non-commercial use‚Äù package (license similar to Colour Text's) which support the display of colour pictures and QuickTime‚Ñ¢ movies in any-shape windows. These windows need not have borders and may have scripts attached to them so that they behave like buttons, thus giving the illusion of any-shape coloured buttons in HyperCard. The package also contains a number of other utilities, including ‚ÄúSticky Buttons‚Äù which can be embedded into scrolling text fields. You should be able to ftp this package from your local archive site. Disclaimer: This package was written by the same author as Colour Text, so I'm naturally biased!‚Ä¢ HyperTintThis is a commercial package along the lines of Colorzie HyperCard described above. A demo version is available on archive sites.None of the above provide a simple, low memory usage, way of drawing coloured text in HyperCard fields. The Colour Text Package has been written to fill this gap.</span><span class="style21">Acknowledgement</span><span class="style1">The first version of this package was written for Doug Eernisse, University of Michigan, to enable various DNA strings to be displayed in colour for easy identification. Thanks go to him for getting me thinking, for testing the result, and giving useful feedback. If later in this stack you wonder why some of the supplied colour tables have 24 entries the answer is that 24 colours are required to colour the peptides & DNA in Doug's stack‚Ķ If you'd like to use Doug's stack it is called ‚ÄúAligner‚Äù and is available as ‚ÄúAligner.hqx‚Äù by ftp to ftp.bio.indiana.edu in subdirectory molbio/mac.</span></text>
  440.     </content>
  441.     <name></name>
  442.     <script></script>
  443. </card>
  444.  
  445.  
  446. card_5541.xml
  447. <?xml version="1.0" encoding="utf-8" ?>
  448. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  449. <card>
  450.     <id>5541</id>
  451.     <filler1>0</filler1>
  452.     <bitmap>BMAP_5764.pbm</bitmap>
  453.     <cantDelete> <false /> </cantDelete>
  454.     <showPict> <true /> </showPict>
  455.     <dontSearch> <false /> </dontSearch>
  456.     <owner>5304</owner>
  457.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  458.     <part>
  459.         <id>7</id>
  460.         <type>button</type>
  461.         <visible> <true /> </visible>
  462.         <reserved5> 0 </reserved5>
  463.         <reserved4> 0 </reserved4>
  464.         <reserved3> 0 </reserved3>
  465.         <reserved2> 0 </reserved2>
  466.         <reserved1> 0 </reserved1>
  467.         <enabled> <true /> </enabled>
  468.         <rect>
  469.             <left>188</left>
  470.             <top>187</top>
  471.             <right>214</right>
  472.             <bottom>211</bottom>
  473.         </rect>
  474.         <style>opaque</style>
  475.         <showName> <false /> </showName>
  476.         <highlight> <false /> </highlight>
  477.         <autoHighlight> <false /> </autoHighlight>
  478.         <sharedHighlight> <true /> </sharedHighlight>
  479.         <family>0</family>
  480.         <titleWidth>0</titleWidth>
  481.         <icon>27009</icon>
  482.         <textAlign>center</textAlign>
  483.         <font>Chicago</font>
  484.         <textSize>12</textSize>
  485.         <textStyle>plain</textStyle>
  486.         <name>Next</name>
  487.         <script>on mouseUplock screenset lockMessages to truesend closeCard to this cdgo next cardsend openCard to this cdunlock screen with visual effect wipe leftopenWindowsset lockMessages to falseend mouseUp</script>
  488.     </part>
  489.     <part>
  490.         <id>9</id>
  491.         <type>button</type>
  492.         <visible> <true /> </visible>
  493.         <reserved5> 0 </reserved5>
  494.         <reserved4> 0 </reserved4>
  495.         <reserved3> 0 </reserved3>
  496.         <reserved2> 0 </reserved2>
  497.         <reserved1> 0 </reserved1>
  498.         <enabled> <true /> </enabled>
  499.         <rect>
  500.             <left>0</left>
  501.             <top>188</top>
  502.             <right>26</right>
  503.             <bottom>212</bottom>
  504.         </rect>
  505.         <style>transparent</style>
  506.         <showName> <false /> </showName>
  507.         <highlight> <false /> </highlight>
  508.         <autoHighlight> <false /> </autoHighlight>
  509.         <sharedHighlight> <true /> </sharedHighlight>
  510.         <family>0</family>
  511.         <titleWidth>0</titleWidth>
  512.         <icon>21700</icon>
  513.         <textAlign>center</textAlign>
  514.         <font>Chicago</font>
  515.         <textSize>12</textSize>
  516.         <textStyle>plain</textStyle>
  517.         <name>Home</name>
  518.         <script>on mouseUpgo homeend mouseUp</script>
  519.     </part>
  520.     <part>
  521.         <id>14</id>
  522.         <type>field</type>
  523.         <visible> <true /> </visible>
  524.         <dontWrap> <false /> </dontWrap>
  525.         <dontSearch> <false /> </dontSearch>
  526.         <sharedText> <false /> </sharedText>
  527.         <fixedLineHeight> <false /> </fixedLineHeight>
  528.         <autoTab> <false /> </autoTab>
  529.         <lockText> <true /> </lockText>
  530.         <rect>
  531.             <left>14</left>
  532.             <top>46</top>
  533.             <right>403</right>
  534.             <bottom>187</bottom>
  535.         </rect>
  536.         <style>scrolling</style>
  537.         <autoSelect> <false /> </autoSelect>
  538.         <showLines> <false /> </showLines>
  539.         <wideMargins> <true /> </wideMargins>
  540.         <multipleLines> <false /> </multipleLines>
  541.         <reservedFamily> 0 </reservedFamily>
  542.         <titleWidth>0</titleWidth>
  543.         <icon>0</icon>
  544.         <textAlign>center</textAlign>
  545.         <font>Times</font>
  546.         <textSize>12</textSize>
  547.         <textStyle>plain</textStyle>
  548.         <textHeight>16</textHeight>
  549.         <name>Copyright</name>
  550.         <script></script>
  551.     </part>
  552.     <part>
  553.         <id>15</id>
  554.         <type>field</type>
  555.         <visible> <true /> </visible>
  556.         <dontWrap> <false /> </dontWrap>
  557.         <dontSearch> <false /> </dontSearch>
  558.         <sharedText> <false /> </sharedText>
  559.         <fixedLineHeight> <false /> </fixedLineHeight>
  560.         <autoTab> <false /> </autoTab>
  561.         <lockText> <true /> </lockText>
  562.         <rect>
  563.             <left>39</left>
  564.             <top>7</top>
  565.             <right>376</right>
  566.             <bottom>43</bottom>
  567.         </rect>
  568.         <style>shadow</style>
  569.         <autoSelect> <false /> </autoSelect>
  570.         <showLines> <false /> </showLines>
  571.         <wideMargins> <true /> </wideMargins>
  572.         <multipleLines> <false /> </multipleLines>
  573.         <reservedFamily> 0 </reservedFamily>
  574.         <titleWidth>0</titleWidth>
  575.         <icon>0</icon>
  576.         <textAlign>center</textAlign>
  577.         <font>Colour Switcher</font>
  578.         <textSize>24</textSize>
  579.         <textStyle>italic</textStyle>
  580.         <textStyle>bold</textStyle>
  581.         <textHeight>32</textHeight>
  582.         <name>Title</name>
  583.         <script>on mouseDownif the optionKey is downthenset the visible of bg btn "Lock" to not the visible of bg btn "Lock"end ifend mouseDown</script>
  584.     </part>
  585.     <part>
  586.         <id>16</id>
  587.         <type>button</type>
  588.         <visible> <true /> </visible>
  589.         <reserved5> 0 </reserved5>
  590.         <reserved4> 0 </reserved4>
  591.         <reserved3> 0 </reserved3>
  592.         <reserved2> 0 </reserved2>
  593.         <reserved1> 0 </reserved1>
  594.         <enabled> <true /> </enabled>
  595.         <rect>
  596.             <left>303</left>
  597.             <top>186</top>
  598.             <right>403</right>
  599.             <bottom>203</bottom>
  600.         </rect>
  601.         <style>rectangle</style>
  602.         <showName> <true /> </showName>
  603.         <highlight> <false /> </highlight>
  604.         <autoHighlight> <false /> </autoHighlight>
  605.         <sharedHighlight> <true /> </sharedHighlight>
  606.         <family>0</family>
  607.         <titleWidth>0</titleWidth>
  608.         <icon>0</icon>
  609.         <textAlign>center</textAlign>
  610.         <font>Times</font>
  611.         <textSize>12</textSize>
  612.         <textStyle>plain</textStyle>
  613.         <name>Version History</name>
  614.         <script>on mouseUpif the visible of cd fld "History" thensend hideField to cd fld "History"elsesend showField to cd fld "History"end ifend mouseUp</script>
  615.     </part>
  616.     <part>
  617.         <id>17</id>
  618.         <type>field</type>
  619.         <visible> <false /> </visible>
  620.         <dontWrap> <false /> </dontWrap>
  621.         <dontSearch> <false /> </dontSearch>
  622.         <sharedText> <false /> </sharedText>
  623.         <fixedLineHeight> <false /> </fixedLineHeight>
  624.         <autoTab> <false /> </autoTab>
  625.         <lockText> <true /> </lockText>
  626.         <rect>
  627.             <left>14</left>
  628.             <top>46</top>
  629.             <right>403</right>
  630.             <bottom>187</bottom>
  631.         </rect>
  632.         <style>scrolling</style>
  633.         <autoSelect> <false /> </autoSelect>
  634.         <showLines> <false /> </showLines>
  635.         <wideMargins> <true /> </wideMargins>
  636.         <multipleLines> <false /> </multipleLines>
  637.         <reservedFamily> 0 </reservedFamily>
  638.         <titleWidth>0</titleWidth>
  639.         <icon>0</icon>
  640.         <textAlign>left</textAlign>
  641.         <font>Times</font>
  642.         <textSize>12</textSize>
  643.         <textStyle>plain</textStyle>
  644.         <textHeight>16</textHeight>
  645.         <name>History</name>
  646.         <script>on mouseUphideFieldend mouseUpon showFieldif not the visible of me thenlock screenshow meset the name of cd btn id 16 to "Introduction"unlock screen with visual effect wipe leftend ifend showFieldon hideFieldif the visible of me thenlock screenhide meset the name of cd btn id 16 to "Version History"unlock screen with visual effect wipe rightend ifend hideField</script>
  647.     </part>
  648.     <content>
  649.         <layer>background</layer>
  650.         <id>6</id>
  651.         <text>Dr N Perry, Department of Computer Sicence, Massey University,Palmerston North, New Zealand. Email: N.Perry@massey.ac.nz</text>
  652.     </content>
  653.     <content>
  654.         <layer>card</layer>
  655.         <id>14</id>
  656.         <text><span class="style1">his package consists of the stacks ‚ÄúColour Text Stack‚Äù & ‚ÄúColour Table Maker‚Äù and the font file ‚ÄúColour Text Fonts‚Äù. All XCMD, XFCN & WDEF code resources, fonts and stacks in this package are Copyright ¬© 1992 by Nigel Perry. Code resources written using Think C ¬© Symantec</span><span class="style11">PostcardWare</span><span class="style1">If you appreciate (or just use!) this package then please send me a postcard of your home area or town. Thank you.</span><span class="style21">LICENSE AGREEMENT</span><span class="style1">‚ÄúYou,‚Äù ‚Äúyour,‚Äù and the ‚Äúuser‚Äù refers to any person or entity which acquires or uses this software.‚ÄúSoftware‚Äù refers to the computer programs identified above, together with all codes, techniques, software tools, formats, designs, concepts, methods, ideas, and documentation associated with the computer program(s).  The term also includes all copies of any part of the software and documentation.‚ÄúAuthor‚Äù refers to the author of this software,  Dr Nigel PerryThis software is owned by the author and contains valuable and proprietary information of the author. If you violate any part of this agreement, your right to use this software terminates automatically.  In the event of termination of this agreement, you must destroy all copies of this software and derivatives of this software in your possession.This software is being licensed to you as provided by the terms of this agreement.(1) You are permitted to copy and distribute this package unchanged, except as excluded by (3) and (4) below, provided that this notice is preserved on all copies.(2)  If you are NOT an author of ShareWare software then you may use all or part of this package in stacks & applications for your personal use and in stacks & applications which you distribute free, except as excluded by (4) below, provided this notice is preserved.(3) If you ARE an author of ShareWare, then you may use this package for your personal use, except as excluded by (4) below, for a period of 7 days. To obtain permission to use this package after this period you must supply the author with a waiver in writing for the fees of all your ShareWare products. You will then be granted the same rights to use this software as is given to non ShareWare authors in (2) above.(4)This software, any part of it, or any derivative of it, cannot be used: for work, buisness, commercial or profit-making purposes; included with, or as part of, other products which are sold or distributed for profit; as an inducement to buy other products; or included in ShareWare; without the permission of the author. A licence fee will usually be charged for any use covered by this clause. School, college & university teachers, lecturers and researchers, and charitable institutions will normally not be charged a licence fee for use of this software in their work.(5) No warranty, either express or implied, is made with respect the softwares performance or fitness for purpose.(6) You may not reverse engineer, disassemble, decompile, or otherwise attempt to discover the logic or source code to this software.(Without prejudice to the above, the conditions might be paraphrased as</span><span class="style12"> ‚ÄúProvided you don't make money out of this software or charge me for your software [unless written as part of your job and sold as a commercial product], then you may use this software for free. If you wish to make money out of my software or charge me for yours then you don't get to use this for free‚Äù</span><span class="style1">. That sounds fair to me.)</span></text>
  657.     </content>
  658.     <content>
  659.         <layer>card</layer>
  660.         <id>15</id>
  661.         <text><span class="style1"></span><span class="style24">C</span><span class="style1">#</span><span class="style24">o</span><span class="style1">$</span><span class="style24">l</span><span class="style1">%</span><span class="style24">o</span><span class="style1">&</span><span class="style24">u</span><span class="style1">'</span><span class="style24">r</span><span class="style1">! </span><span class="style24">Text for HyperCard v1.1</span></text>
  662.     </content>
  663.     <content>
  664.         <layer>card</layer>
  665.         <id>17</id>
  666.         <text>Version 1.0: July 92¬†¬†¬†¬†Initial Release.Version 1.1:  Sept 92¬†¬†¬†¬†The invisible colour text windoid was being created at the front of all¬†¬†¬†¬†other windoids instead of behind them. This meant that if another¬†¬†¬†¬†windoid (e.g. message box) was over the field being coloured then a¬†¬†¬†¬†picture of the windoid was superimposed over the colour text. Thanks¬†¬†¬†¬†to Matt Neuberg for reporting this.</text>
  667.     </content>
  668.     <name>Intro</name>
  669.     <script>on openCardset the scroll of cd fld "Copyright" to 0set the scroll of cd fld "History" to 0end openCardon openWindowsget Colourize("cd fld Title","TextColours",Colour)end openWindowson closeCardsend hideField to cd fld "History"if there is a window "Colour" thenclose window "Colour"end ifset the scroll of cd fld "Copyright" to 0end closeCardon arrowKey whichif which is "Right" thensend mouseUp to btn "Next"elseif which is not "Left" thenpass arrowKeyend ifend ifend arrowKey</script>
  670. </card>
  671.  
  672.  
  673.